#ifndef __PCPT_COMM_FILE_H__
#define __PCPT_COMM_FILE_H__

#include "comm/comm_base.h"
#include "comm/comm_dbg_log.h"
#include "comm/comm_file.h"

#include <sys/stat.h>
#include <sys/types.h>
#include <string.h>
#include <stdio.h>

using namespace std;

class FILE_MNG_EX_C : public FILE_MNG_C
{
public:
    FILE_MNG_EX_C() : FILE_MNG_C() {}
    ~FILE_MNG_EX_C(){}

    bool IsFile(const char* filePath);
    bool IsDirectory(const char* dirPath);

    int  DeleteFile(const char* filePath);
    bool IsDirExisted(string &dirPath);
    bool IsDirExist(const char* dirPath);
    bool IsFileExist(const char* filePath);
    int  CreatDirectory(const char* dirPath);
    int  CreatDirectoryRecursive(string &dirPath);
    int  CheckDirPath(string &dirPath);

private:
    void AddBackSlashAtEnd(string &dirPath);
};

#endif